<?php

class loan_history_model extends CI_Model 
{
    function __construct()
    {
        // Call the Model constructor
        parent::__construct();
    }
	
	// Get Loans based on Loan ID
	function getLoansByID( $access_id )
	{
		$this->db->where('access_id', $access_id);
		$this->db->from('tbl_loan_history');
		return $this->db->get();
	}

	// Add loan
	function addLoan( $data_array )
	{
		$this->db->insert('tbl_loan_history', $data_array); 
	}
}

?>